﻿using System;
using System.Text;

using BizElements.Core;
using BizElements.Core.ProviderComponents;

namespace BizElements.Core.SQLite
{
    sealed class SQLiteColumnRenderer : IColumnRenderer
    {
        public void RenderColumnName(IDbColumn column, StringBuilder output)
        {
            // Special characters must be enclosed in brackets.
            output.Append("[");
            output.Append(column.ColumnName);
            output.Append("]");
        }

        public void RenderAlias(IDbColumn column, StringBuilder output)
        {
            // Special characters must be enclosed in brackets.
            output.Append("[");
            output.Append(column.Alias);
            output.Append("]");
        }
    }
}